<?PHP

/** Save those souls still using PHP4 **/
if (!function_exists('array_diff_key'))
{
	function array_diff_key(){
		$arrs = func_get_args();
		$result = array_shift($arrs);
		foreach ($arrs as $array) {
			foreach ($result as $key => $v) {
				if (array_key_exists($key, $array)) {
					unset($result[$key]);
				}
			}
		}
		return $result;
	}
}

if (!function_exists('array_intersect_key'))
{
	function array_intersect_key ($isec, $arr2)
	{
		$argc = func_num_args();

		for ($i = 1; !empty($isec) && $i < $argc; $i++){
			$arr = func_get_arg($i);
			foreach ($isec as $k => $v)
				if (!isset($arr[$k]))
					unset($isec[$k]);
		}

		return $isec;
	}
}

?>